﻿#include "CmdSetHeatMapComplexPartsChanged.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdSetHeatMapComplexPartsChanged::CmdSetHeatMapComplexPartsChanged()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdSetHeatMapComplexPartsChanged::~CmdSetHeatMapComplexPartsChanged()
    {
    }

    bool CmdSetHeatMapComplexPartsChanged::execute()
    {
        //bool _success = false;
        emit IBaseSignalInstance->signal_setHeatMapComplexPartsChanged(m_windowId, m_isAmplitudeChecked, m_isPhaseChecked, m_isRealPartChecked, m_isImaginaryPartChecked);
        return true;
    }

    void CmdSetHeatMapComplexPartsChanged::undo()
    {
    }

    void CmdSetHeatMapComplexPartsChanged::redo()
    {
        // execute();
    }

    void CmdSetHeatMapComplexPartsChanged::setHeatMapComplexPartsChanged(int windowId, bool isAmplitudeChecked, bool isPhaseChecked, bool isRealPartChecked, bool isImaginaryPartChecked)
    {
        m_windowId = windowId;
        m_isAmplitudeChecked = isAmplitudeChecked;
        m_isPhaseChecked = isPhaseChecked;
        m_isRealPartChecked = isRealPartChecked;
        m_isImaginaryPartChecked = isImaginaryPartChecked;
    }

} // namespace PostCommand
